package com.cty.vo;

import java.util.Objects;

/**
 * @Auther: cty
 * @Date: 2020/2/14 21:11
 * @Description:
 * @version: 1.0
 */
public class Hero {
    private int id;
    private String name;
    private String price;
    private String role;

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getPrice() {
        return price;
    }

    public String getRole() {
        return role;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public void setRole(String role) {
        this.role = role;
    }

    @Override
    public String toString() {
        return "Hero{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price='" + price + '\'' +
                ", role='" + role + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Hero)) return false;
        Hero hero = (Hero) o;
        return getId() == hero.getId() &&
                Objects.equals(getName(), hero.getName()) &&
                Objects.equals(getPrice(), hero.getPrice()) &&
                Objects.equals(getRole(), hero.getRole());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getName(), getPrice(), getRole());
    }
}
